<template>
  <div>
    <h2>第五题</h2>
    <ul class="one">
      <li v-for="(item, index) in list" :key="index">
        <input type="checkbox" :value="item" v-model="arr" />{{ item }}
      </li>
    </ul>
    <ul>
      <li v-for="item in arr" :key="item">{{ item }}</li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: ["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
      arr: [],
    };
  },
};
</script>

<style lang="less">
.one {
  display: flex;
  li {
    list-style: none;
  }
}
</style>